﻿using System;
using System.ComponentModel;
using System.Windows;

namespace Comarch.Animation.SL5Example
{
    public class SingleAnimation : INotifyPropertyChanged
    {
        private string _animationName;
        public string AnimationName
        {
            get { return _animationName; }
            set
            {
                _animationName = value;
                RaisePropertyChanged("AnimationName");
            }
        }

        private string _animationDescription;
        public string AnimationDescription
        {
            get { return _animationDescription; }
            set
            {
                _animationDescription = value;
                RaisePropertyChanged("AnimationDescription");
            }
        }

        private Action<FrameworkElement, StoryboardBuilder> _animation;
        public Action<FrameworkElement, StoryboardBuilder> Animation
        {
            get { return _animation; }
            set
            {
                _animation = value;
                RaisePropertyChanged("Animation");
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        public void RaisePropertyChanged(string name)
        {
            var handler = PropertyChanged;
            if (handler != null) 
                handler(this, new PropertyChangedEventArgs(name));
        }
    }
}